Resourceror is a plug-in menu command for SuperPaint. It takes the image within the current selection rectangle and creates several types of standard Macintosh bit-image resources using the Create command in the Resourceror sub-menu. The resources can either be placed in the clipboard or they can be saved directly to a file.
The Resource Types
=================
'ICON's and 'ICN#'s are 32 x 32 bit-image resource types. Resourceror will produce an 'ICON' resource using the 32 x 32 bit image in the upper left corner of the selection rectangle. If the selection rectangle is smaller than 32 x 32 then the 'ICON' resource will contain only the bits that are within the selection rectangle. The 'ICN#' resource consists of an icon image similar to that created for an 'ICON' resource, plus a ╘mask╒ bit image which Resourceror. The mask is created in the same fashion as the mask created in ResEdit.
Small icons, 'SICN's, and 'CURS's are 16 x 16 bit-image resource types. Resourceror will produce a 'SICN' resource consisting of two small icon images. The first small icon image comprising the 'SICN' resource is created using the 16 x 16 bit image in the upper left corner of the selection rectangle. If the selection rectangle is smaller than 16 x 16 then the small icon image will contain only the bits that are within the selection rectangle. The second small icon in the 'SICN' is a mask for the first small icon.
The 'CURS' resource created by Resourceror consists of a 16 x 16 bit image similar to the first small icon created for a 'SICN' resource. It then has a mask bit image and a Point designating the hotspot of the cursor which is set to (0,0). The mask is created in the same fashion as the mask created in ResEdit.
The 'BTMP' and 'BTM#' resources are new resource types that were proposed by Mike Scanlin. Basically, the 'BTMP' resource type consists of a BitMap field followed by a bit image. The dimension of the bit image is specified in the bounds field of the BitMap field. The rowBytes field of the BitMap is filled in with the width of the bit image in bytes, rounded up to an even number of bytes. The baseAddr field is initialized to NULL.
typedef struct {
╩╩╩╩BitMap map;
╩╩╩╩short image[];
} TBTMP, *TBTMPPeek, **TBTMPPkHndl;
typedef BitMap *BTMPPtr, **BTMPHndl;
The 'BTM#' resource consists of a list of 'BTMP' entries. It begins with an INTEGER count field specifying the number of entries. Then, each entry consists of an INTEGER szEntry field specifying the size in bytes of the entry, and a 'BTMP'.
For details on using the new resource types see the accompanying C source files BTMP.c and BTMP.h, and Mike Scanlin╒s article in MacTutor magazine.
Resourceror can also create a 'PICT' resource. This resource is a simple bitmap which appears the same as the other created resources. The main reason this is created is for reference purposes if the resources are pasted into the Scrapbook.
Any combination of resource types can be created with the Create command by checking/unchecking the resource types in the middle section of the Resourceror sub-menu. Settings are permanently saved automatically.
Saving to the Clipboard
=====================
When the To Clipboard menu item is checked the resources will be placed in the clipboard. From there they can be placed in the Scrapbook to be later transferred to another file using ResEdit. Or if you are running SuperPaint and ResEdit at the same time under MultiFinder you can directly transfer resources through the clipboard. However, when tranferring directly through the clipboard only one type of resource should be placed in the clipboard at a time, otherwise ResEdit won╒t ╥see╙ any of the resources in the clipboard.
Saving to a File
==============
When the To File menu item is checked you can save resources directly to a file. When saving directly to a file you will be prompted for the file to save to with a dialog. Select the file you want the resources saved to, then click the Save button in the dialog. You cannot save to a file whose resource fork is currently open. If you select a file whose resource fork is open the Save button will be dimmed and a notice will appear at the bottom of the dialog.
If you want to create a new file to save the resources to click the New button and another dialog will appear allowing you to name the new file and select the volume and directory to create it in.
About ResourceGuides.stat
========================
The file ResourceGuides.stat is a SuperPaint stationery file. It contains outline guide objects for 32 x 32 and 16 x 16 boxes. These can be used as guides when drawing your artwork for the resources. The interior of the larger boxes measures 32 x 32 pixels. The interior of the smaller box measures 16 x 16 pixels.
Copyright and Non-Distribution Notice
==================================
Resourceror is Copyright ⌐ 1989 by Michael Ogawa ╤ All Rights Reserved.
May not be redistributed for commercial purposes. May not be redistributed if altered in any way, or without accompanying documents. May be freely distributed on electronic bulletin boards provided no additional charges above the board╒s standard connect charges are imposed. May be freely distributed by non-profit organizations on disk provided that any charges for the distribution disk does not exceed actual disk, labelling materials, reproduction, and shipping charges incurred by the organization.
This software is provided ╥as is╙, with no warranties, either express or implied, being made regarding its fitness for any particular purpose.